<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@  taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8" />
<title>学籍信息管理系统</title>
<!-- 引入css样式文件 -->
<!-- Bootstrap Core CSS -->
<link href="<%=basePath%>css/bootstrap.min.css" rel="stylesheet" />
<!-- MetisMenu CSS -->
<link href="<%=basePath%>css/metisMenu.min.css" rel="stylesheet" />
<!-- DataTables CSS -->
<link href="<%=basePath%>css/dataTables.bootstrap.css" rel="stylesheet" />
<!-- Custom CSS -->
<link href="<%=basePath%>css/sb-admin-2.css" rel="stylesheet" />
<!-- Custom Fonts -->
<link href="<%=basePath%>css/font-awesome.min.css" rel="stylesheet"
	type="text/css" />
<link href="<%=basePath%>css/boot-crm.css" rel="stylesheet"
	type="text/css" />
</head>
<body>

	<div class="container">
		<!--  标题  按钮 数据  分页 -->
		<div class="row " class="col-md-12">
			<h1>学生信息展示</h1>
		</div>

   <!-- 		主体头标签展示 -->
		<div class="row">
			<div class="col-md-1">
				<a href="<%=basePath%>/stuList.action"  class="btn  btn-primary">用户列表</a>
			</div>
			<div class="col-md-offset-9  col-md-3">
				<button class="btn  btn-primary">添加</button>
				<button class="btn  btn-danger">批量删除</button>
			</div>
		</div>
		
                <!--分页展示学生数据 -->
					<div class="row">
				<div class="col-lg-12">
					<div class="panel panel-default">
						<div class="panel-heading">学生信息列表</div>
						<!-- /.panel-heading -->
						<table class="table table-bordered table-striped">
							<thead>
								<tr>
									<th>学号</th>
									<th>姓名</th>
									<th>性别</th>
									<th>生日</th>
									<th>电话</th>
									<th>地址</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${pageInfo.list}" var="row">
									<tr>
										<td align="center">${row.id}</td>
										<td align="center">${row.sname}</td>
										<td align="center">${row.gender}</td>
										<td align="center"><fmt:formatDate value="${row.birthday}" pattern="yyyy-MM-dd"/></td>
										<td align="center">${row.phone}</td>
										<td align="center">${row.address}</td>
										<td align="center"><a href="#"
											class="btn btn-primary btn-xs" data-toggle="modal"
											data-target="#customerEditDialog"
											>修改</a> <a href="#"
											class="btn btn-danger btn-xs"
											>删除</a></td>
									</tr>
								</c:forEach>
							</tbody>
						</table>
						<div class="row">
							<div class="col-md-6">当前第${pageInfo.pageNum}页/共${pageInfo.pages}页每页${pageInfo.pageSize} 总共${pageInfo.total}数据</div>
							<div class="col-md-6">
								<nav aria-label="Page navigation">
									<ul class="pagination">
										<li><a href="<%=basePath%>/list.action?pn=1">首页</a></li>
										<c:if test="${pageInfo.hasPreviousPage}">

											<li><a href="#" aria-label="Previous">
												<span aria-hidden="true">&laquo;</span></a></li>
										</c:if>
										<c:forEach items="${ pageInfo.navigatepageNums}" var="pageNum">
											<c:if test="${pageNum==pageInfo.pageNum}">
												<li class="active">
													<a href="<%=basePath%>/list.action?pn=${pageNum }">${pageNum }</a>
												</li>
											</c:if>
											<c:if test="${pageNum!=pageInfo.pageNum}">
												<li class="  ">
													<a href="<%=basePath%>/list.action?pn=${pageNum }">${pageNum }</a>
												</li>
											</c:if>
										</c:forEach>
										<!--    <li><a href="#">1</a></li>
                                          <li><a href="#">2</a></li>
                                          <li><a href="#">3</a></li>
                                          <li><a href="#">4</a></li>
                                          <li><a href="#">5</a></li>    -->

										<c:if test="${pageInfo.hasNextPage }">
											<li><a href="<%=basePath%>/list.action?pn=${pageInfo.pageNum+1 }" aria-label="Next">
												<span aria-hidden="true">&raquo;</span></a></li>
										</c:if>
										<li><a href="<%=basePath%>/list.action?pn=${pageInfo.pages }">末页</a></li>
									</ul>
								</nav>






					</div>
					
				</div>
				
			</div>
      

	</div>


</body>
</html>